import React, {Component} from 'react';
import {
    Flex,
    Icon,
    Tabs,
    WingBlank,
    WhiteSpace,
    NavBar,
    Popover,
    Modal,
    List,
    Button,
    Drawer
} from 'antd-mobile';
import { goods_search,sto_discount,sto_footer,sto_coupon, spanMask} from './stores.less';
import MyListView from '../../components/MyListView/MyListView';
import MyListViewLz from '../../components/MyListViewLz/MyListViewLz';
import MyScroll from '../../components/MyScroll/MyScroll';
import { connect } from 'dva';
import {routerRedux} from "dva/router";
import {goods_list, goods_search_header,tabs_tit} from "../search/GoodsSearch.less";

import {stores, tabsDiv, stroresTow} from "../storesShow/stores.less";
 import NoLazyImg from '../../components/NoLazyImg/NoLazyImg';
import { IMAGE_DOMAIN } from '../../utils/common';
import SearchBar from '../../components/SearchBar/SearchBar';
import updown1 from '../../assets/svg/updown1.svg';
import updown2 from '../../assets/svg/updown2.svg';
import updown3 from '../../assets/svg/updown3.svg';
import lingqu from "../../assets/svg/lingqu.svg";
import noCouponsvg from "../../assets/img/noCoupon.svg";
import doodsFilter from '../../assets/svg/filter.svg';
//import { sto_coupon} from './stores.less';
import SpecFilter from '../search/specFilter';
import showChange1 from '../../assets/svg/showChange1.svg';
import showChange2 from '../../assets/svg/showChange2.svg';
import shangxinTime from '../../assets/svg/shangxinTime.svg';
import {ActionSheet, Toast} from "antd-mobile/lib/index";
import couponbg1 from '../../assets/img/couponbg1.png';



let wrapProps;
const Item = Popover.Item;
class Stores extends Component {
    constructor(props){
        super(props);
        this.state={
          id:this.props.match.params.id,
           newList:[],
            visible:false,
            isShow:false,
            selected: '',
            concernModel:false,
            fav:0,
            layoutType:true,
            open: false,

            isStyle: true,
        };
        this.sendData = {};
        this.AlloyTouch = null;
        this.AlloyTouch1 = null;
        this.AlloyTouch2 = null;
    }



    componentDidMount(){
        this.props.dispatch({ type: 'storesShow/getstoresEFF', obj:{ id:this.props.match.params.id } })
        this.props.dispatch({ type: 'storesShow/getgoodsEFF', obj:{ id:this.props.match.params.id } })
        this.props.dispatch({ type: 'storesShow/getnewgoodsEFF', obj:{ storeId:this.props.match.params.id } })
        this.props.dispatch({ type: 'storesShow/getcouponEFF', obj:{ storeId:this.props.match.params.id } })
        this.props.dispatch({ type: 'storesShow/getclassEFF',obj:{storeId:this.props.match.params.id }})
}

    onSelect = (opt) => {
        // console.log(opt.props.value);
        this.setState({
            visible: false,
            selected: opt.props.value,
        });
    };
    handleVisibleChange = (visible) => {
        this.setState({
            visible,
        });
    };
    refresh = () => {
        // return this.props.dispatch({ type: 'storesShow/getgoodsEFF', obj:{ pageNo: 1, id: this.props.match.params.id } });
        return this.sendRequest(1);
    }
    handlePayModel = (vName, vValue) => {
        this.setState({
            [vName]:vValue
        })
    }

    loadMore = () => {
        console.log("触发loadMore  方法");
        return this.sendRequest(++this.props.storesShow.pageNo);
        // return this.props.dispatch({ type: 'storesShow/getgoodsEFF', obj:{ pageNo: this.props.storesShow.pageNo + 1, id: this.props.match.params.id } });
    }
    getAlloyTouch = (AT) => this.AlloyTouch = AT
    getAlloyTouch1 = (AT) => this.AlloyTouch1 = AT
    getAlloyTouch2 = (AT) => this.AlloyTouch2 = AT

    touchTo = n => {
        if (this.AlloyTouch) this.AlloyTouch.to(n);
        if (this.AlloyTouch1) this.AlloyTouch1.to(n);
        if (this.AlloyTouch2) this.AlloyTouch2.to(n);
    }

    sendRequest = (pageNo = 1, sortField = "", sortOrder = '') => {
        return this.props.dispatch({
            type: 'storesShow/getgoodsEFF',
            obj:{
                id: this.props.match.params.id,
                pageNo: pageNo,
                sortField: sortField || this.sendData.sortField,
                orderBy: sortOrder || this.sendData.sortOrder,
                goodsType:0
            }
        });
    }

    changeOrder = ( sortField, sortOrder ) =>{
        this.touchTo(0);
        Toast.loading();
        this.sendData = {sortField, sortOrder};
        this.sendRequest(1, sortField, sortOrder);
    }

    setSpecial = is => this.setState({isStyle: is})

    onOpenChange = (e) => {

        //console.log(minimumPrice=="");
        if(this.state.open==true){
            const { minimumPrice, maximumPrice } = this.props.storesShow;
            // 最低最高
            // console.log(parseInt(minimumPrice, 10));
            if(minimumPrice!=""&&maximumPrice!=""&&parseInt(minimumPrice, 10) >= parseInt(maximumPrice, 10)) {
                Toast.info('最低价不能大于最高价', 1.5);
                return;
            }

            this.props.dispatch({
                type: 'storesShow/filterSureEFF',
                obj:{
                    pageNo:1
                }
            });
        };
        this.setState({ open: !this.state.open });
    }
    render() {
        const {  storesShow=[] } = this.props;
        const datas = storesShow
        const list = storesShow.list
        const listTwo = storesShow.newList
        const total = storesShow.total
        const classList = storesShow.chart
        let { concernModel} = this.state;
        const {minimumPrice, maximumPrice,isShow ,filter,specList} = this.props.storesShow

      console.log(this.props.storesShow,'232432432432432432432')

        const tabs = [
            { title: <Flex direction='column'className={tabs_tit}style={{lineHeight:'.3rem',paddingTop:'.1rem'}}>
                    <span >全部商品</span>
                    <span style={{fontSize:'.25rem',paddingTop:'.2rem'}}>{datas.goodsCount||0 }</span>
                </Flex>},
            { title: <Flex direction='column'style={{lineHeight:'.3rem'}}style={{lineHeight:'.3rem',paddingTop:'.1rem'}}>
                    <span >上新</span>
                    <span style={{fontSize:'.25rem',paddingTop:'.2rem'}}>{datas.newGoodsNum||0}</span>
                </Flex> },
            { title: <Flex direction='column'style={{lineHeight:'.3rem'}}style={{lineHeight:'.3rem',paddingTop:'.1rem'}}>
                    <span >优惠券</span>
                    <span style={{fontSize:'.25rem',paddingTop:'.2rem'}}>{datas.couponNum||0}</span>
                </Flex> }
        ];

        let { layoutType, open } = this.state;

        return ( <Flex style={{
                height:"100%",position:'relative'
            }} direction="column" className={this.state.isStyle ? stores : stroresTow}>
                {/*<SearchBar></SearchBar>*/}
                {/*<NavBar*/}
                    {/*style={{width:'100%',background:'none'}}*/}
                    {/*mode="light"*/}
                    {/*icon={<Icon type="left" />}*/}
                    {/*onLeftClick={() => console.log('onLeftClick')}*/}
                {/*>*/}
                    {/*<form style={{width:'100%',position:'relative',padding:'.3rm .3rem'}}>*/}
                    {/*<input className='search_input' placeholder="请输入关键字搜索"readOnly type="search" />*/}
                    {/*<Icon  className='search_icon' type="search" size="md" />*/}
                    {/*</form>*/}
                    {/*</NavBar>*/}
                <Flex className={goods_search} direction="column" style={{background:`${"url("+IMAGE_DOMAIN+datas.banner+")"+" center center/100% 100% no-repeat"}`, position: 'relative'}}>
                    <span className={ spanMask }></span>
                    <NavBar
                        style={{paddingTop:'.3rem',background:'none', height: '2rem', zIndex: '999',width:"100%"}}
                        // style={{width:'100%',background:'none', height: '2rem', zIndex: '999'}}
                        icon={<Icon type="left" style={{color:'#fff'}}/>}
                        onLeftClick={() => {
                            this.props.dispatch(routerRedux.goBack());
                        }}
                         >
                        <div style={{position:'relative'}}>
                            <input className='search_input' style={{fontSize:'.25rem',paddingLeft:'.1rem'}} placeholder="请输入关键字搜索" type="search" onClick={ ()=>{
                                this.props.dispatch(routerRedux.replace(`/stores/${this.props.match.params.id}`));
                            } }/>
                        <Icon key="0" type="search" style={{position:'absolute',color:'#999', right:'.3rem', top: '50%', transform: 'translateY(-50%)', width: '.4rem', height: '.4rem'}} />
                        </div>
                    </NavBar>
                    <Flex justify="around" style={{width:'100%', height:'3rem', padding: '//.4rem 0rem .6rem', transform: 'translateY(-.1rem)'}}>
                        <Flex>
                             <span  className='sto_pic' >
                                 <NoLazyImg src={datas.logo==undefined?"../../assets/img/imgError.jpg":datas.logo} style={{width:'100%',height:'100%',borderRadius:"100%"}} alt=""/>
                             </span>
                            <div className='sto_info'style={{color:'#fff',fontSize:".3rem"}}>
                                <div style={{marginBottom:".2rem"}}>{datas.name}</div>
                                <div>{datas.description}</div>
                            </div>
                        </Flex>

                        {/*this.props.dispatch({ type: 'storesShow/getattEFF',obj:{ id:datas.id,favType:2 }})*/}

                        <span className='sto_btn' onClick={()=>{  this.props.dispatch({ type: 'storesShow/getattEFF', obj:{ id:datas.id,favType:2 }}).then(res=>{
                            if(res.code==200){
                                this.props.dispatch({ type: 'storesShow/getstoresEFF', obj:{ id:this.props.match.params.id } })
                            }
                        }) } }>{datas.isFav == 1 ?'已关注':'关注'}</span>
                    </Flex>
                </Flex>


                {/*// --------------------------气泡*/}
                { this.state.isShow?<div style={{overflow:'scroll', position:'fixed',bottom:'1.2rem',height:'4rem',border:'.01rem solid #999',width:'1.4rem', borderRadius: '.15rem',textAlign:'center',zIndex:'999',background:'#fff',padding:'.1rem .2rem'}}>

                    <MyScroll style={{height:"100%  "}}>
                        <ul style={{listStyle:'none',lineHeight:'1rem',textAlign:'center',padding:'0',margin:'0',fontSize:'.3rem',height:"100%"}}>
                            {classList!=undefined && classList.map((v, i, a) => {
                                return (
                                    <li style={{borderBottom:"1px solid #999"}} key={i} onClick={()=>{ this.props.dispatch(routerRedux.push({pathname: `/storesSearch/${v.stcId}/${this.props.match.params.id}/${v.stcName}`}))}}>{v.stcName}</li>
                                )
                            })
                            }
                        </ul>
                        {/*<div style={{*/}
                            {/*position:'absolute',*/}
                            {/*bottom:'-.15rem',*/}
                            {/*left:'50%',*/}
                            {/*transform:'translate(-50%)',*/}
                            {/*height:'0',*/}
                            {/*width:'0',*/}
                            {/*border:'15px solid #E8E8E8',*/}
                            {/*borderColor:'#E8E8E8 transparent  transparent',*/}
                            {/*zIndex:'111111',*/}

                        {/*}}></div>*/}
                    </MyScroll>

                    </div> :''}
                <Flex className={sto_footer}>
                    <div style={{textAlign:'center',width:"33%",borderRight:"1px solid #999"}}
                         onClick={()=>{
                             this.props.dispatch(routerRedux.push({
                                 pathname: `/storesDetail/${this.props.match.params.id}`,
                             }))}}
                    >
                        <span>店铺详情</span>
                    </div>
                    <div style={{textAlign:'center',width:"33%"}}>
                         <span onClick={()=>{
                             this.setState({ isShow: !this.state.isShow});
                         }
                         }>商品分类</span>
                    </div>
                    <div style={{textAlign:'center',width:"33%",borderLeft:"1px solid #999"}}>
                        <span><a style={{color:"#333"}} href={"tel:"+datas.tel}>联系卖家</a></span>
                    </div>
                </Flex>
                <Tabs className={ tabsDiv } tabs={tabs} initialPage={0} animated={false} useOnPan={false} onChange={() => this.setState({isStyle: true})}>
                    <Flex direction='column'  style={{ display: 'flex', alignItems: 'center', justifyContent: 'center',  height:'100%' }}>
                        <Flex className={goods_search_header}>
                            <Flex
                                justify="center"
                                onClick={() => {
                                    this.touchTo(0);
                                    this.changeOrder();
                                // this.props.dispatch({ type: 'storesShow/getgoodsEFF', obj:{ id:this.props.match.params.id } })
                            }}
                            >
                                <span style={this.props.storesShow.specFilter ==''?{marginRight: '.04rem',color:"#ff0036"}:{marginRight: '.04rem'}}>综合</span>
                                {/*<Icon  type={*/}
                                {/*filter.sortField =='' ? (filter.sortOrder=="asc" ? updown3.id : updown2.id) :  updown1.id*/}
                                {/*}/>*/}
                            </Flex>

                            <Flex
                                justify="center"
                                onClick={() => {
                                    //console.log(this.props, this.props.storesShow.specFilter =='salenum', this.props.storesShow.specFilter, this.props.sortOrder)
                                    this.touchTo(0);
                                    this.changeOrder('salenum', this.props.storesShow.specFilter =='salenum' ? ( this.props.storesShow.sortOrder == 'asc' ? "desc" : "asc" ) : "asc")}

                                }
                            >
                                <span style={{marginRight: '.04rem'}}>销量</span>
                                <Icon  type={
                                    this.props.storesShow.specFilter =='salenum' ? (this.props.storesShow.sortOrder=='asc'? updown2.id : updown3.id) :  updown1.id
                            }/>
                            </Flex>

                            <Flex
                                justify="center"
                                onClick={() => {
                                    this.touchTo(0);
                                    this.changeOrder('goodsStorePrice', this.props.storesShow.specFilter =='goodsStorePrice' ? ( this.props.storesShow.sortOrder=="asc" ? "desc" : "asc" ) : "asc")}
                                }
                            >
                                <span style={{marginRight: '.04rem'}}>价格</span>
                                <Icon  type={
                                    this.props.storesShow.specFilter =='goodsStorePrice' ? (this.props.storesShow.sortOrder=="asc" ? updown2.id : updown3.id) :  updown1.id
                                }/>
                            </Flex>
                            {/*<Flex justify="center"*/}
                                  {/*onClick={ this.onOpenChange }*/}
                            {/*>*/}
                                {/*<span>筛选</span>*/}
                                {/*<Icon  type={doodsFilter.id}/>*/}
                            {/*</Flex>*/}
                            <Flex justify="center" >
                                <Icon
                                    onClick={()=>{
                                        this.setState({ layoutType: !layoutType },()=>{
                                            this.touchTo(0);
                                        });
                                    }}
                                    className="search_cancelbtn"
                                    type={ layoutType==true ? showChange2.id : showChange1.id }
                                    style={{width:".5rem",height:".5rem", transform: 'translate(.2rem)'}}
                                />
                            </Flex>
                        </Flex>
                        <MyListView
                            style={{marginBottom:'1rem',background:"#f7f7f7"}}
                            // key={ layoutType == true ? 1 : 0 }
                            //  className={ wrapper_goods_list }
                            isHaveSpecial={true}
                            Special={this.setSpecial}
                            getAlloyTouch={ this.getAlloyTouch }
                            refresh={ this.refresh }
                            loadMore={ this.loadMore }
                            hasMore={ this.props.storesShow.pageNo * this.props.storesShow.pageSize < this.props.storesShow.totalRows }
                            itemWrapperClass={ goods_list }
                            bottomStyle={ layoutType == true ? {} : { marginTop:"0.2rem", paddingTop:'0rem' } }
                            renderItem={(v,i,a)=>{
                                // console.log(v, "asd");
                                return (
                                    <div  onClick={()=>{ this.props.dispatch(routerRedux.push(`/goodsDetail/${v.specId}`)) }}  style={ layoutType == true ? {} : { width:'50%', float:'left' } } key={i}>
                                        {
                                            this.state.layoutType ==true ?
                                                <div style={{ paddingLeft:'0.14rem', backgroundColor:"#fff" }}>
                                                    <Flex  style={{ height:"0.2rem" }}>
                                                        <div style={ i==0 ? { border:"none" } : {} } className="gli_line"></div>
                                                    </Flex>
                                                    <Flex className="goods_list_item">
                                                        <div className="goods_img">
                                                            <NoLazyImg src={ v.image } />
                                                            {
                                                                v.serial < 10 && v.serial > 0 ? <div className="serial">仅剩{v.serial}件</div> : ""
                                                            }
                                                            {
                                                                v.serial == 0 ? <div className="no_store"></div> : ""
                                                            }
                                                        </div>

                                                        <Flex direction="column" className="goods_content">
                                                            <div className="name text-two-eli"  style={ v.serial == 0 ? { color:'#999' } : {} }>{ v.name }</div>
                                                            <div className="price" style={ v.serial == 0 ? { color:'#999',width:"100%" } : {width:"100%"} }>￥{ v.storePrice }</div>
                                                            <div className="commentnum_evaluate">
                                                                <span style={{ marginRight:"0.5rem" }}>{v.commentnum}条评价</span>
                                                                <span>销量：{ v.salenum }</span>
                                                            </div>
                                                        </Flex>
                                                    </Flex>
                                                </div> :
                                                <div className="goods_list_item2" style={ i%2==0 ? { margin:'0.2rem 0.1rem 0rem 0.2rem' } : { margin:'0.2rem 0.2rem 0rem 0.1rem' } }>
                                                    <div className="goods_img">
                                                        <NoLazyImg src={ v.image } />
                                                        {
                                                            v.serial < 10 && v.serial > 0 ? <div className="serial">仅剩{v.serial}件</div> : ""
                                                        }
                                                        {
                                                            v.serial == 0 ? <div className="no_store"></div> : ""
                                                        }
                                                    </div>
                                                    <div className="name text-overflow-hidden" style={ v.serial == 0 ? { color:'#999' } : {} }>{ v.name }</div>
                                                    <div className="price" style={ v.serial == 0 ? { color:'#999' } : {} }>￥{ v.storePrice }</div>
                                                    <div className="commentnum_evaluate">
                                                        <span style={{ marginRight:"0.5rem" }}>{v.commentnum}条评价</span>
                                                        <span>销量：{ v.salenum }</span>
                                                    </div>
                                                </div>
                                        }
                                    </div>
                                )
                            }}
                            data={ list }>
                        </MyListView>
                    </Flex>
                    <Flex  direction='column'style={{width:'100%',height:'100%'}}>
                        <MyListViewLz
                            kid="1"
                            style={{marginBottom:'1rem',background:"#f7f7f7"}}
                             key={ layoutType == true ? 1 : 0 }
                            // className={ wrapper_goods_list }
                            getAlloyTouch={ this.getAlloyTouch1 }
                          //  refresh={ this.refresh }
                           // loadMore={ this.loadMore }
                            // hasMore={ hasMore    }
                            itemWrapperClass={ goods_list }
                            bottomStyle={ layoutType == true ? {} : { marginTop:"0.2rem", paddingTop:'0rem' } }
                            renderItem={(v,i,a)=>{
                                return (
                                    <div style={{width:'100%',height:'100%'}} onClick={() => { this.props.
                                dispatch(routerRedux.push(`/goodsDetail/${v.specId}`))
                                }}  key={i}>
                                {
                                v.isShow==1?
                                <Flex  direction='column'  justify="center" style={{width:'100%',marginBottom:'.1rem'}}>
                                    <Flex  justify="center" style={{width:'100%',margin:'.2rem 0'}}>
                                        <span style={{width:'25%',border:'1px solid #ECECEC'}}></span>
                                        <div className="updateTime" style={{fontSize:".25rem",display:"flex",alignItems:"center"}}><Icon type={shangxinTime.id} style={{width:".35rem",height:".35rem"}}/>{v.updateTime}日本店上新</div>
                                        <span style={{width:'25%',border:'1px solid #ECECEC'}}></span>
                                    </Flex>
                                    <div style={{width:"100%"}}>
                                        <WingBlank>
                                            <div style={{textAlign:"center",background:"#fff",width:'100%',padding:'0.1rem .3rem',borderBottom:'.01rem solid #eee'}}>
                                                <NoLazyImg style={{width:'100%'}} src={v.image}/>
                                                <div style={{padding:".45rem 0",borderTop:"1px solid #e5e5e5",width:'100%',textAlign:"left",lineHeight:".45rem",fontSize:".3rem"}}>{v.name}</div>
                                                <span style={{display:'block',width:'100%',textAlign:"left",color:'red',fontSize:'.35rem'}}>￥{v.storePrice}</span>
                                            </div>
                                        </WingBlank>
                                    </div>

                                   </Flex>:
                                    <Flex  direction='column'  justify="center" style={{width:'100%',marginBottom:'.1rem'}}>
                                        <div style={{width:"100%"}}>
                                            <WingBlank>
                                                <div style={{textAlign:"center",background:"#fff",width:'100%',padding:'0.1rem .3rem',borderBottom:'.01rem solid #eee'}}>
                                                    <NoLazyImg style={{width:'100%'}} src={v.image}/>
                                                    <div style={{padding:".45rem 0",borderTop:"1px solid #e5e5e5",width:'100%',textAlign:"left",lineHeight:".45rem",fontSize:".3rem"}}>{v.name}</div>
                                                    <span style={{display:'block',width:'100%',textAlign:"left",color:'red',fontSize:'.35rem'}}>￥{v.storePrice}</span>
                                                </div>
                                            </WingBlank>
                                        </div>

                                    </Flex>
                                }
                                </div>

                                )
                            }}
                            data={ listTwo }>
                        </MyListViewLz>
                        {/*{changes().map((v, i, a) => {*/}
                            {/*return (*/}
                                {/*<div style={{width:'100%',height:'100%'}} onClick={() => { this.props.*/}
                                    {/*dispatch(routerRedux.push(`/goodsDetail/${v.specId}`))*/}
                                {/*}}  key={i}>*/}
                                    {/*{*/}
                                        {/*v.isShow==1?<Flex  direction='column'  justify="center" style={{background:'#fff',width:'100%',marginBottom:'.1rem'}}>*/}
                                            {/*<Flex  justify="center" style={{width:'100%',margin:'.1rem 0'}}>*/}
                                                     {/*<span style={{width:'38%',border:'1px solid #ECECEC'}}></span>*/}
                                                    {/*<span>{v.updateTime}</span>*/}
                                                    {/*<span style={{width:'38%',border:'1px solid #ECECEC'}}></span>*/}
                                                 {/*</Flex>*/}
                                            {/*<div style={{width:'100%',padding:'0 .3rem'}}>*/}
                                                {/*<NoLazyImg style={{width:'96%'}}src={v.image}/>*/}
                                                    {/*<p style={{width:'96%'}}>{v.name}</p>*/}
                                                    {/*<span style={{display:'block',width:'96%',color:'red',fontSize:'.3rem'}}>￥{v.storePrice}</span>*/}
                                            {/*</div>*/}
                                        {/*</Flex>:*/}
                                            {/*<div style={{width:'100%',padding:'0 .3rem',height:'100%'}}>*/}
                                                {/*<NoLazyImg style={{width:'96%'}}src={v.image}/>*/}
                                                {/*<p style={{width:'96%'}}>{v.name}</p>*/}
                                                {/*<span style={{display:'block',width:'96%',color:'red',fontSize:'.3rem'}}>￥{v.storePrice}</span>*/}
                                            {/*</div>*/}
                                    {/*}*/}
                                {/*</div>*/}
                            {/*)*/}
                        {/*})*/}
                        }

                    </Flex>
                    <Flex  direction='column'style={{ display: 'flex', height:'100%' ,padding:'0 .1rem'}}>
                        <MyListViewLz
                            kid="2"
                            style={{marginBottom:'1rem'}}
                            key={ layoutType == true ? 1 : 0 }
                            // className={ wrapper_goods_list }
                            getAlloyTouch={ this.getAlloyTouch2 }
                            //refresh={ this.refresh }
                            //loadMore={ this.loadMore }
                            // hasMore={ hasMore    }
                            itemWrapperClass={ goods_list }
                            bottomStyle={ layoutType == true ? {} : { marginTop:"0.2rem", paddingTop:'0rem' } }
                            renderItem={(v,i,a)=>{
                                return (
                                    <div className={sto_coupon} key={i} style={{position:"relative", padding: '0 .1rem'}}>
                                        <img style={{width:'100%',height:'77%'}}src={require('../../assets/img/couponbg1.png')} alt=""/>
                                        <p style={{width:'100%',lineHeight:'.2rem',color:'#fff',marginLeft:".3rem",fontSize:".3rem"}}>{v.shopActivityEntity.storeName}</p>
                                        <div style={{width:'100%',display:'flex',position:'absolute',height:'1rem',top:'.8rem'}}>
                                            <span style={{width:'35%',fontSize:'.6rem',padding:'0 .4rem 0 .4rem', color: '#fff', textAlign: 'right'}}>{v.couponSource}<span style={{paddingLeft:'.1rem',fontSize:'.3rem'}}>元</span></span>
                                            <span style={{width:'42%',fontSize:".27rem"}}>
                                               <span style={{display:'block',color:'#fff'}}>{v.description}</span>
                                               <span style={{display:'block',marginTop:'.2rem',color:'#fff'}}>{v.shopActivityEntity.startTimeStr}至{v.shopActivityEntity.endTimeStr}</span>
                                                {
                                                    v.isGet?<Icon type={lingqu.id} style={{width:"1.5rem",height:"1.5rem",position: "absolute",
                                                        right: ".3rem",
                                                        bottom: ".45rem"}}/>:""
                                                }
                                           </span>
                                            {v.isGet?"":
                                                <span style={{display:'inline-block',zIndex:"10",width:'1.5rem',lineHeight:'.5rem',textAlign:'center',height:'.5rem',background:'#fff',color:v.isGet?'#333':"#ff0036",borderRadius:'.4rem',marginTop:'.2rem'}}   onClick={()=>{
                                                        if (v.restrictionNum == 0) return false;
                                                        this.props.dispatch({ type: 'storesShow/getcouEFF',obj:{ id :v.id,storeId:v.shopActivityEntity.storeId }}).then(res => this.props.dispatch({ type: 'storesShow/getcouponEFF', obj:{ storeId:this.props.match.params.id } }))
                                                    }} >{  v.restrictionNum !== 0 ? "点击领取" : "已领完" }</span>
                                            }
                                        </div>
                                        <div style={{position:'absolute',bottom:'.15rem',left:'.4rem',fontSize:".27rem"}}>会员限制：{v.shopActivityEntity.memberLevel}；商品限制：{v.shopActivityEntity.goodsType == 0 ? "全部商品" : v.shopActivityEntity.goodsType == 1 ? "指定商品分类" : v.shopActivityEntity.goodsType == 2 ? "指定商品类型": v.shopActivityEntity.goodsType==3 ? "指定品牌" : '指定商品'}</div>
                                    </div>

                                )
                            }}
                            data={ total}>
                        </MyListViewLz>
                        {/*{total.map((v,i,a)=>{*/}
                            {/*return(*/}

                            {/*<div className={sto_coupon} key={i}>*/}
                                {/*<img style={{width:'100%',height:'80%'}}src={require('../../assets/img/couponbg1.png')} alt=""/>*/}
                                {/*<p style={{width:'100%',lineHeight:'.2rem',color:'#fff'}}>{v.shopActivityEntity.storeName}</p>*/}
                                {/*<div style={{width:'100%',display:'flex',position:'absolute',height:'1rem',top:'.8rem'}}>*/}
                                    {/*<span style={{width:'33%',fontSize:'.6rem',paddingLeft:'.2rem',color:'#fff'}}>{v.couponSource}<span style={{paddingLeft:'.2rem',fontSize:'.2rem'}}>元</span></span>*/}
                                    {/*<span style={{width:'44%'}}>*/}
                                   {/*<span style={{display:'block',color:'#fff'}}>{v.description}</span>*/}
                                   {/*<span style={{display:'block',marginTop:'.2rem',color:'#fff'}}>{v.shopActivityEntity.startTimeStr}至{v.shopActivityEntity.endTimeStr}</span>*/}
                               {/*</span>*/}
                                    {/*<span style={{display:'inline-block',width:'1.5rem',lineHeight:'.5rem',textAlign:'center',height:'.5rem',background:'#fff',color:'red',borderRadius:'.4rem',marginTop:'.2rem'}}   onClick={()=>{this.props.dispatch({ type: 'storesShow/getcouEFF',obj:{ id:v.id,storeId:v.shopActivityEntity.storeId }})}} >点击领取</span>*/}
                                {/*</div>*/}
                                {/*<div style={{position:'absolute',bottom:'.1rem',left:'.1rem'}}>会员限制：{v.shopActivityEntity.membershipId}；商品限制：{v.shopActivityEntity.goodsType}</div>*/}
                            {/*</div>*/}
                            {/*)*/}
                        {/*})}*/}
                    </Flex>
                </Tabs>
                <Flex className={goods_search_header}>


                </Flex>
                <Modal
                    popup
                    visible={concernModel}
                    onClose={()=>{ this.handlePayModel("concernModel", false) }}
                    animationType="slide-up"
                >
                    <div>
                        <List>
                            <Item><Button type='primary' onClick={() =>{ this.setState({ concernModel:false, coutype: 1 }, () => {this.props.dispatch({ type: 'storesShow/getattEFF',obj:{ id:datas.id,favType:2 }})}) }}>{datas.isFav==1 ?'取消关注':'确定关注'}</Button></Item>
                            <Item><Button type='ghost' onClick={()=>{ this.handlePayModel("concernModel", false) }}>取消</Button></Item>
                        </List>
                    </div>
                </Modal>
                {/*筛选——————————————————————*/}
                {/*<Drawer*/}
                    {/*className="my-drawer"*/}
                    {/*style={{ width: open==true ? "100%" : "1%" }}*/}
                    {/*enableDragHandle*/}
                    {/*position="right"*/}
                    {/*sidebarStyle={{ width:"80%", marginLeft:'20%', maxWidth:'6rem',backgroundColor:'#fff' }}*/}
                    {/*contentStyle={{ width:'0rem',height:"0rem" }}*/}
                    {/*sidebar={*/}
                        {/*<SpecFilter onOpenChange={ this.onOpenChange } minimumPrice={ minimumPrice } maximumPrice={ maximumPrice } specList={ specList } dispatch={dispatch} ></SpecFilter>*/}
                    {/*}*/}
                    {/*open={ open }*/}
                    {/*onOpenChange={this.onOpenChange}*/}
                {/*>*/}
                    {/*<span></span>*/}
                {/*</Drawer>*/}
            </Flex>

        )


    }
}

export default connect(({ storesShow }) => ({ storesShow }))(Stores);
